import unittest,time
from Po.Page import Page
from selenium import webdriver
from Po.Page2 import Page2
from Po.Page3 import Page3
from Po.Page4 import Page4
from Po.Page5 import Page5
from Po.Page6 import Page6
from Po.Page7 import Page7
from ddt import ddt,file_data
import yaml



@ddt
class TetCase(unittest.TestCase):

    def setUp(self) -> None:
        self.driver = webdriver.Edge()
        self.driver.maximize_window()


    def tearDown(self) -> None:
        time.sleep(3)
        self.driver.quit()

    @file_data(r'D:\gao1\PythonProject4\Po\yamlb.yaml')
    def test_A3mall_01(self,username,password):
        po = Page(self.driver)
        po.luoji_A3mall(username=username,password=password)


    # def test_A3mall_02(self):
    #     po = Page2(self.driver)
    #     po.luoji_A3mall()
    #     po.aress()
    #     po.add()
    #     time.sleep(4)
    #     # print("断言3：",po.bj())
    #     po.sf()
    #     time.sleep(1)
    #     po.sq()
    #     time.sleep(1)
    #     po.qy()
    #     time.sleep(1)
    #     po.accname()
    #     po.mobile()
    #     po.address()
    #     po.tijiao()
    #     print("断言4：",po.guo)
    #
    #
    # def test_jiuxian(self):
    #     po = Page3(self.driver)
    #     po.luoji_jiuxian()
    #     po.login()
    #     po.user()
    #     po.password()
    #     po.loginbtn()
    #
    # def test_jiuxiann(self):
    #     po = Page4(self.driver)
    #     po.sousuo()
    #     po.sousuobtn()
    #     time.sleep(3)
    #     po.spxq()
    #     po.window()
    #     po.jiaru()
    #     time.sleep(3)
    #
    # def test_jiuxiannn(self):
    #     po = Page5(self.driver)
    #     po.sousuo()
    #     po.sousuobtn()
    #     time.sleep(3)
    #     po.spxq()
    #     po.window()
    #     po.shoucang()
    #     time.sleep(3)
    #
    # def test_126(self):
    #     po=Page6(self.driver)
    #     po.luoji_126()
    #
    # def test_1262(self):
    #     po=Page7(self.driver)
    #     po.luoji_126()



if __name__ == '__main__':
    unittest.main()
